package com.dj.common.web.service.tablesplit.impl;

import java.text.SimpleDateFormat;
import java.util.Date;

import com.dj.common.web.service.tablesplit.Strategy;

public class YearMonthlyStrategy implements Strategy {

	@Override
	public String convert(String tableName, String strategy) {
		SimpleDateFormat sdf = new SimpleDateFormat(strategy);
		StringBuilder sb = new StringBuilder(tableName);
		sb.append("_");
		sb.append(sdf.format(new Date()));
		return sb.toString();
	}
}
